﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MuaHangNXB.ascx.cs" Inherits="Admin_Parts_MuaHangNXB" %>

    <asp:Label ID="Label1" runat="server" Text="Đăng ký mua hàng tại nhà xuất bản" 
        Font-Bold="True" Font-Size="16pt"></asp:Label>        

    <br />
    <br />

    <asp:Label ID="Label2" runat="server" Text="Chọn nhà xuất bản"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <asp:DropDownList ID="drlnxb" runat="server">
    </asp:DropDownList>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <asp:Button ID="btnketnoi" runat="server" Height="23px" Text="Kết nối" 
        onclick="btnketnoi_Click" />

    <br />
    <br />

    <asp:Label ID="Label4" runat="server" Text="Chọn danh mục cha" 
        Visible="False"></asp:Label>

&nbsp;&nbsp;&nbsp;

    <asp:DropDownList ID="drldmc" runat="server" AutoPostBack="True" 
        onselectedindexchanged="drldmc_SelectedIndexChanged" Visible="False">
    </asp:DropDownList>

    <br />
    <br />

    <asp:Label ID="Label3" runat="server" Text="Chọn danh mục" Visible="False"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <asp:DropDownList ID="drldm" runat="server" 
    onselectedindexchanged="drldm_SelectedIndexChanged" AutoPostBack="True" 
    Visible="False">
    </asp:DropDownList>

    <br />
    <br />

<asp:GridView ID="GridView1" runat="server" 
    AutoGenerateColumns="False" AutoGenerateSelectButton="True" 
    BackColor="White" BorderColor="#999999" BorderWidth="1px" 
    CellPadding="3" ForeColor="Black" GridLines="Vertical" AllowPaging="True" 
    AllowSorting="True" BorderStyle="Solid">
    
    <Columns>
        <asp:BoundField DataField="ProductID" HeaderText="Product ID" 
            SortExpression="ProductID" />
        <asp:BoundField DataField="ProductName" HeaderText="Product Name" 
            SortExpression="ProductName" />
        <asp:BoundField DataField="ProductPrice" HeaderText="Product Price" 
            SortExpression="ProductPrice" />
        <asp:TemplateField HeaderText="Product Photo URL">
            <EditItemTemplate>
                <%--<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ProductPhotoURL") %>'></asp:TextBox>--%>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:TextBox ID="TextBox1" Visible="false" runat="server" Text='<%# Bind("ProductPhotoURL") %>'></asp:TextBox>
                <asp:Image ID="Image1" runat="server" 
                    ImageUrl='<%# Bind("ProductPhotoURL") %>' Height="100" Width="100" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Product Description">
            <ItemTemplate>
                <asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine" ReadOnly="true" 
                    Text='<%# Bind("ProductDescription") %>' Enabled="False" Height="42px" 
                    Width="227px"></asp:TextBox>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="UpdateDate" HeaderText="Update Date" 
            SortExpression="UpdateDate" />
        <asp:BoundField DataField="QuantityAtLeast" HeaderText="Quantity At Least" 
            SortExpression="QuantityAtLeast" />
        <asp:BoundField DataField="OtherInfo" HeaderText="Other Info" 
            SortExpression="OtherInfo" />
    </Columns>
    
    <FooterStyle BackColor="#CCCCCC" />
    <PagerStyle BackColor="#999999" ForeColor="Black" 
        HorizontalAlign="Center" />
    
    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="#CCCCCC" />
</asp:GridView>

    <br />

    <center>
        <asp:Button ID="btndangky" runat="server" Text="Đăng ký" 
            onclick="btndangky_Click" Visible="False" />
    </center>

    <br />
    <br />

    <asp:Panel ID="Panel1" runat="server" Visible="False">
        <center><asp:Label ID="Label10" runat="server" Font-Bold="True" Font-Size="18pt" 
            Text="Thông tin giao dịch cho sản phẩm"></asp:Label>
        </center>

        <br />
        <br />

        <asp:Label ID="Label5" runat="server" Text="Product ID"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="txtid" runat="server" Enabled="False"></asp:TextBox>

        <br />
        <br />

        <asp:Label ID="Label6" runat="server" Text="Min Quality"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="txtminq" runat="server"></asp:TextBox>

        <br />
        <br />

        <asp:Label ID="Label7" runat="server" Text="Next Trans Quality"></asp:Label>
        &nbsp;&nbsp;
        <asp:TextBox ID="txtnextq" runat="server"></asp:TextBox>

        <br />
        <br />

        <asp:Label ID="Label8" runat="server" Text="Begin Trans Date"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        &nbsp; &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" Height="30px" 
            ImageUrl="~/Admin/Images/calendar.png" onclick="ImageButton1_Click" />
        &nbsp;&nbsp;<br />
        &nbsp;&nbsp;

        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
            BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
            Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
            Width="200px" onselectionchanged="Calendar1_SelectionChanged" 
            Visible="False">
            <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
            <SelectorStyle BackColor="#CCCCCC" />
            <WeekendDayStyle BackColor="#FFFFCC" />
            <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
            <OtherMonthDayStyle ForeColor="#808080" />
            <NextPrevStyle VerticalAlign="Bottom" />
            <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
            <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
        </asp:Calendar>

        <br />
        <br />

        <asp:Label ID="Label9" runat="server" Text="End Trans Date"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
        &nbsp;&nbsp;
        <asp:ImageButton ID="ImageButton2" runat="server" Height="30px" 
            ImageUrl="~/Admin/Images/calendar.png" onclick="ImageButton2_Click" />

        <br />
        <br />

        <asp:Calendar ID="Calendar2" runat="server" BackColor="White" 
                BorderColor="#999999" DayNameFormat="Shortest" 
                Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
            Width="200px" CellPadding="4" 
            onselectionchanged="Calendar2_SelectionChanged" Visible="False">
                <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                <SelectorStyle BackColor="#CCCCCC" />
                <WeekendDayStyle BackColor="#FFFFCC" />
                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
                <OtherMonthDayStyle ForeColor="#808080" />
                <NextPrevStyle VerticalAlign="Bottom" />
                <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                <TitleStyle BackColor="#999999" Font-Bold="True" BorderColor="Black" />
        </asp:Calendar>

        <center>
            
        <br />
            
        <asp:Button ID="btnchapnhan" runat="server" Text="Chấp nhận" 
                onclick="btnchapnhan_Click" /></center>
</asp:Panel>

    <br />
        

<asp:Panel ID="Panel2" runat="server" Visible="False">
    <center>
        <asp:Label ID="Label11" runat="server" Font-Bold="True" Font-Size="18pt" 
            Text="Giỏ hàng"></asp:Label>

        <br />
        <br />

        <asp:GridView ID="grv" runat="server" AutoGenerateColumns="False" 
            AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" 
            BackColor="White" BorderColor="#999999" BorderWidth="1px" 
            CellPadding="3" ForeColor="Black" GridLines="Vertical" 
            onpageindexchanging="GridView2_PageIndexChanging" 
            onrowcancelingedit="GridView2_RowCancelingEdit" 
            onrowdeleting="grv_RowDeleting2" onrowediting="GridView2_RowEditing" 
            onrowupdating="GridView2_RowUpdating" BorderStyle="Solid">
            <Columns>
                <asp:BoundField DataField="ProductID" HeaderText="Product ID" ReadOnly="true" 
                    SortExpression="ProductID" />
                <asp:BoundField DataField="MinQuantity" HeaderText="Min Quantity" 
                    SortExpression="MinQuantity" />
                <asp:BoundField DataField="NextTransQuantity" HeaderText="Next Trans Quantity" 
                    SortExpression="NextTransQuantity" />
                <asp:BoundField DataField="BeginTransDate" HeaderText="Begin Trans Date" 
                    SortExpression="BeginTransDate" />
                <asp:BoundField DataField="EndTransDate" HeaderText="End Trans Date" 
                    SortExpression="EndTransDate" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" />
            <PagerStyle BackColor="#999999" ForeColor="Black" 
                HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#000099" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="#CCCCCC" />
        </asp:GridView>

        <br />

        <asp:Button ID="Button1" runat="server" Text="Gửi giao dịch" 
            onclick="Button1_Click" />
    </center>
</asp:Panel>